#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

void Printf1(int arr[3][5], int x, int y)
{
	int i, j;
	for (i = 0; i < x; i++)
	{
		for (j = 0; j < y; j++)
		{
			printf("%d ", arr[i][j]);
		}
		printf("\n");
	}
}

void Printf2(int (*p)[5], int x, int y)
{
	int i, j;
	for (i = 0; i < x; i++)
	{
		for (j = 0; j < y; j++)
		{
			printf("%d ", *(*(p + i) + j)); //*(*(p + i) + j) == *(p + i)[j] == *(p[i] + j) == p[i][j]
		}
		printf("\n");
	}
}

int main()
{
	int arr[3][5] = { {1,2,3,4,5},{2,3,4,5,6},{3,4,5,6,7} };
	Printf1(arr, 3, 5);
	Printf2(arr, 3, 5);
	return 0;
}